git blameの名前はどこから?
#git #歴史的経緯
gitの便利なサブコマンド blame は、しかし「糾弾する」というややネガティブな名前を持つ。
これはなぜだろうか? 由来が気になった。
https://web.archive.org/web/20140715085454/http://matsui.goga.co.jp/article/367495501.html
によれば、SubversionもCVSも blame または annotate コマンドを持っていたらしい。
https://www.quora.com/Why-is-git-blame-called-blame
のScott Furman氏曰く、1997年頃Netscapeで cvsblame というperlスクリプトを書き、
後に同様の機能がCVS本体に追加されたという。
I’m not sure if I can definitively take credit for the name, but in 1997 or so, while working at Netscape, I wrote a closed-source perl script called “cvsblame” that displayed an annotated listing of a file with each line prefixed by the author/revision/date of its most recent change. Later on, “cvs blame”, a.k.a. “cvs annotate”, commands were added to the CVS revision control system, though it appears the implementation was independent of mine. As others have noted, other versions control systems, including subversion and git have added similar functionality.
本当だろうか? CVSのソースを確認してみる。
https://ftp.gnu.org/non-gnu/cvs/source/stable/1.11.23/NEWS.1.11.23 には
Changes since 1.11.22:
**********************
NEW FEATURES
* A new log option -n reverts the -N option which may be in a .cvsrc
file.
* The cvs blame' command is now a synonym for the cvs annotate' command.
と書いてあった。version 1.11.23で別名が追加されたらしい。
ChangeLogを見ると、より詳しいことがわかった。
http://cvs.savannah.gnu.org/viewvc/cvs/ccvs/ChangeLog?view=log#rev1.692.2.260
2008-01-24 Mark D. Baushke <mdb@gnu.org>
* NEWS: Note that :extssh: method was fixed. New `cvs blame' as an
alias for cvs annotate' command. New cvs log -n' switch to undo
a `log -N' entry in a .cvsrc file.
2008年に追加されている。ではannotate自体は?
http://cvs.savannah.gnu.org/viewvc/cvs/ccvs/ChangeLog?view=log#rev1.175
Thu Mar 28 12:31:38 1996 Jim Kingdon <kingdon@harvey.cyclic.com>
* NEWS: Add "cvs annotate".
1996年3月に作られたらしい。
もう1つのSubversionも調べてみる。CHANGESをみると、
https://github.com/apache/subversion/blob/trunk/CHANGES#L6177
Version 0.32.0 (released 22 October 2003, revision 7480)
http://svn.apache.org/repos/asf/subversion/tags/0.32.0
NOTICE: This release of Subversion causes an ra_dav client/server
compatibility break with Subversions older than 0.28.0.
User-visible changes:
* new 'svn blame' subcommand. (r7389, 7438, #508)
(中略)
Version 0.14.2 Alpha Interim 2 (released 22 Aug 2002, revision 3033)
User-visible changes:
* fs schema change, see issue #842. **NOTE: repos dump/load cycle required!**
* new 'svn ls -R' option
* new status code `~', for type changes
* add --username and --password options to 'svn ls'
* new script tools/client-side/svn_all_diffs.pl
* new script tools/examples/blame.py (draft)
2002年にblame.pyが追加、2003年に blame コマンドが実装されたとある。
ので、時系列としては、
1996年:CVSにannotateが実装される
1997年?:Scott Furmanがcvsblameを作る?
2002年:Subversionにblame.pyが追加される
2003年:Subversionにblameが実装される
2008年:CVSにblameという別名が追加される
という流れになる。
Scott Furman氏がannotate機能の発案者なのか、blameという命名の元なのか?はもう少し調査が必要そうだ。